Skip to content

Conversation

udoprog
Copy link

@udoprog udoprog commented Jan 28, 2018

This switches the project to use RelativePath where it is more appropriate than Path.

Relative paths have consistent directory separators, and platform-neutral serialization (helps when converting to JSON). They are converted into Paths through RelativePath::to_path, which is provided the path that they are relative to.

This means that some of the awkward "convert back to relative path, or a platform neutral variant" patterns can be avoided (stop using path_to_root, normalize_path, and probably more that I haven't cleaned up yet).

This will also help with #589 since relative paths can easily be normalized to determine if a link destination exists or not.

I've compiled both editions of the rust book, and the example project. And both come up with a no-op diff.

@Michael-F-Bryan Michael-F-Bryan self-requested a review February 2, 2018 12:15
@udoprog udoprog closed this by deleting the head repository Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant